<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			

				function sums(){
					 var count = 0;
					 return function computed(n){
						  if(n < 1 && n <=1000 ){
						    return;
						  }
						 if(n==1){
						   console.log(count) ;
						   return count;
						 }
						  if(n%2===0){
						    n=n/2;
						    count++;
						    computed(n);
						  }else{
						    n=(3*n+1)/2;
						     count++;
						     computed(n);
						  }
					}
				}
				sums()(3);
				
		</script>
	</body>
</html>
